<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var shu = parseInt(100*Math.random())+1;
			function dianji(){
			var number = document.getElementById("num").value;
			var jieguo1 = document.getElementById("jieguo");
				if(shu>number){
					jieguo1.innerHTML = "小了";
				}else if(shu<number){
					jieguo1.innerHTML = "大了";
				}else{
					jieguo1.innerHTML = "对了";
					return;
				}
			}
		</script>
	</head>
	<body>
		<input type="text" id="num"/>
		<button onclick="dianji()">猜</button>
		<span id="jieguo"></span>
	</body>
</html>
